// 2013-8-1下午12:41:24  net.betou.trade.main.dao.UserDao.java

package net.betou.trade.main.dao;

import java.util.List;

import net.betou.common.hibernate3.Updater;
import net.betou.common.page.Pagination;
import net.betou.pojo.Report;
import net.betou.trade.entity.main.User;

/**
 * 
 * @author 叶装装
 */
public interface UserDao{

	// 统计的
	 public int countByUsername( String username );
		
	 public int countByEmail( String email );
	
	 public int countByMobile( String mobile );
	 
	 public int countDemoAccount( String demoAccount );
	 
	 public int countFirmAccount( String firmAccount );
	 
	 public User findByUsername( String username );
	 
	 public User findByEmail( String email );
	 
	 public User findByMobile( String mobile );
	 
	 public User findByQuery( String username );
	 
	 public User findById( Integer id );
	 
	 public User save( User bean );
	 
	 public User deleteById( Integer id );
	 
	 public User updateByUpdater( Updater< User > updater );
	 
	 public User findMyUser( Integer userid, Integer adminId );
	 
	 public List< String > findReportChoice( String year, String format, String group );
	 
	 public List< Report > findDayReport( String day );
	 
	 public List< Report > findMonthReport( String month );
	 
	 // 分页数据的
	 public Pagination getPage( Integer selfId, String searchProperty, String searchValue, String orderProperty, String orderDirection, int pageNo, int pageSize, String filterStatus );
	 
	 public Pagination getPageByCriteria( String searchProperty, String searchValue, String orderProperty, String orderDirection, int pageNo, int pageSize, String sql );


	 public List< String > getMobileList( Integer adminId, String [ ] groups );
}
